package hngc.com;

import java.util.Scanner;

public class Box11 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int x=0;
        int y=0;
        int z=0;
        System.out.println("输入x值：");
        while (scanner.hasNext()){
            try {
                x=scanner.nextInt();
                System.out.println("输入y值:");
                y=scanner.nextInt();
                System.out.println("输入z值:");
                z=scanner.nextInt();
                break;
            }catch (Exception e){
                System.out.println("输入不符合规则");
                return;
            }
        }
        if(y>2&&z==0){
            x=x/y;
            System.out.println("x=x/y值:"+x);
        }if(y==2&&x>1){
            x=x+1;
            System.out.println("x=x+1值:"+x);
        }else {
            y=x+z;
            System.out.println("y=x+z"+y);
        }
        scanner.close();
    }
}
